<?php $post = $this->get('post');?>
<form method="post" action="<?php _actionUrl($this)?>" onsubmit="return ajax_form(this)" id="task-form" enctype="multipart/form-data">
<input type="hidden" name="ID" value="<?php _e($post['ID'])?>"/>
<div class="x-list-title"> 
<table height="100%" width="100%" border="0" cellpadding="0">
<tr><td>
<h2>Tin mới</h2>
</td></tr></table>
</div>
<div class="x-form-container">
<table width="100%" border="0" cellpadding="0" class="x-form">
<tr class="row-message">
	<td colspan="2">
		<div class="form-message"><?php $this->e('message');?></div>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Tiêu đề: 
	</td>
	<td class="x-form-input">
		<input type="text" name="title" style="width:400px" class="x-text" value="<?php _e($post['title']);?>"/>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Duyệt: 
	</td>
	<td class="x-form-input">
		<select name="is_approve">
			<option value="yes">Đồng ý</option>
			<option value="no">Không đồng ý</option>
		</select>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Chuyên mục: 
	</td>
	<td class="x-form-input">
	<select class="x-select" name="parent_id">
	<?php foreach( $this->get('folders') as $cat ):?>
	<option value="<?php _e($cat['ID'])?>"><?php _e($cat['title'])?></option>
	<?php endforeach;?>
	</select>
	</td>
</tr>
<tr>	
	<td class="x-form-label">
		Ngày hiển thị: 
	</td>
	<td class="x-form-input">
		<input type="text" title="Kết thúc" name="date" onclick="date_picker(this,{format: 'Y-m-d H:i:s' })" value="<?php _e(date('Y-m-d H:i:s'));?>" class="x-text x-datetime"/>
	</td>
</tr>
<tr>
	<td class="x-form-label" valign="top">
		Mô tả:
	</td>
	<td class="x-form-input">
		<textarea name="desc" class="x-text" style="width:604px;height:100px"><?php _e($post['desc']);?></textarea>
	</td>
</tr>
<tr>
	<td class="x-form-label" valign="top">
		Nội dung:
	</td>
	<td class="x-form-input">
		<textarea name="content" class="x-text" style="width:609px;height:400px"><?php _e($post['desc']);?></textarea>
	</td>
</tr>
<tr>
	<td class="x-form-label" align="center" valign="top">
		Ảnh:
	</td>
	<td class="x-form-input" valign="top">
		<div>
			<?php if( $post['img']):?>
			<img src="<?php _baseUrl();?>/files/news/<?php _e($post['img']);?>"/>	
			<?php endif;?>
		<div class="x-file" filetypes="*.gif;*.jpg;*.png" url="<?php _ctrUrl($this);?>/Img?ID=<?php _e($post['ID'])?>">Tải lên</div>
		</div>
	</td>
</tr>
<tr>
	<td></td>
	<td>
		<?php _e(tpl_button_add('Cập nhật'));?>
		<a class="x-button x-fresh" href="#Project">Hủy bỏ</a>	
	</td>
</tr>
</table></div>
</form>